-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export subclass of Ember.Service, run loops #18
Conversation
resolve(response); | ||
|
||
Ember.run.end(); | ||
Ember.run(null, response.error ? reject : resolve, response); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't use ternary operators, they make code less clear
Thanks for sending this over, if you get rid of the ternary operators I'll merge this in. |
Thanks for feedback, they have been removed. |
hey @romanmatiasko thanks for your contribution, since the run loop optimization breaks the addon, I've gone ahead and separated the service update into #18 and will be closing this in favor of it. |
[improve] export service as suggested by #18
Ember 1.13.0-beta.2 expects service to be a subclass of Ember.Service.
Uncaught Error: Assertion Failed: Expected service:stripe to resolve to an Ember.Service but instead it was (unknown mixin).
See also emberjs/ember.js#11292.
There is only deprecation instead of assert in Ember Canary, but this is definitely more future-proof.
Also, simplified run loops as mentioned in #17.